import { request } from '@/utils/request'

export default {
  // 获取对话列表
  getList(params) {
    return request({
      url: 'http://127.0.0.1:4523/m1/6898636-6614394-default/api/conversations',
      method: 'get',
      params: {
        username: params.username,
        start_time: params.startTime,
        end_time: params.endTime,
        page: params.page,
        page_size: params.pageSize
      }
    })
  },

  // 获取对话详情
  getDetail(id) {
    return request({
      // url: `/conversations/${id}`,
      url: `http://127.0.0.1:4523/m1/6898636-6614394-default/api/conversations/${id}`,
      method: 'get'
    })
  },

  // 获取统计数据
  getStats(params) {
    return request({
      url: 'http://127.0.0.1:4523/m1/6898636-6614394-default/api/conversations/stat',
      method: 'get',
      params
    })
  }
}